$themeColor: #f5f5f5;
// $font-o: #fff;
// $grey: #f5f5f5;
// $bc: #e4e4e4;
// $edit: #444;
// $warn: #ff4149;
// $green: #00a267;
$baseFontSize: 37.5;
// 背景图片地址和大小
@mixin bg($url) {
    background-image: url($url);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

// 背景图片
@mixin bg-image($url) {
    // background-image: url($url + "@2x.png")
    // @media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio: 3)
    //   background-image: url($url + "@3x.png")
    background-image: url("~imgs/icon/" + $url + "@2x.png");
    @media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio: 3){
    background-image: url("~imgs/icon/" + $url + "@3x.png");
    }
}

// 不换行
@mixin ellipsis() {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@mixin borderRadius($radius) {
    -webkit-border-radius: $radius;
    -moz-border-radius: $radius;
    -ms-border-radius: $radius;
    -o-border-radius: $radius;
    border-radius: $radius;
}

//定位全屏
@mixin shadow {
    position: absolute;
    top: 0;
    right: 0;
}

//定位上下左右居中
@mixin center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

//定位上下居中
@mixin ct {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

//定位上下居中
@mixin cl {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

// 图标大小
@mixin iconSize($size: 1rem) {
    width: $size;
    height: $size;
}

//宽高
@mixin wh($width, $height) {
    width: $width;
    height: $height;
}

//字体大小、行高、字体
@mixin font($size: 1rem, $line-height: 100%, $family: 'Microsoft YaHei') {
    font: #{$size}/#{$line-height} $family;
}

//字体大小，颜色
@mixin sc($size, $color) {
    font-size: $size;
    color: $color;
}

//flex 布局和 子元素 对其方式
@mixin fj($type: space-between) {
    display: flex;
    justify-content: $type;
}

//用sass计算从px到rem的转换
@mixin px2rem($name, $px) {
  #{$name}: $px / $baseFontSize * 1rem;
}